Optimal. Leaf size=145 \[ \frac{2 a^2 (4 A+3 B) \sin (c+d x)}{3 d \sqrt{\cos (c+d x)} \sqrt{a \sec (c+d x)+a}}+\frac{2 a^{3/2} B \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \sinh ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{d}+\frac{2 a A \sin (c+d x) \sqrt{\cos (c+d x)} \sqrt{a \sec (c+d x)+a}}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.444454, antiderivative size = 145, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2955, 4017, 4015, 3801, 215} \[ \frac{2 a^2 (4 A+3 B) \sin (c+d x)}{3 d \sqrt{\cos (c+d x)} \sqrt{a \sec (c+d x)+a}}+\frac{2 a^{3/2} B \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \sinh ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{d}+\frac{2 a A \sin (c+d x) \sqrt{\cos (c+d x)} \sqrt{a \sec (c+d x)+a}}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2955
Rule 4017
Rule 4015
Rule 3801
Rule 215
Rubi steps
\begin{align*} \int \cos ^{\frac{3}{2}}(c+d x) (a+a \sec (c+d x))^{3/2} (A+B \sec (c+d x)) \, dx &=\left (\sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{(a+a \sec (c+d x))^{3/2} (A+B \sec (c+d x))}{\sec ^{\frac{3}{2}}(c+d x)} \, dx\\ &=\frac{2 a A \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)} \sin (c+d x)}{3 d}+\frac{1}{3} \left (2 \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{\sqrt{a+a \sec (c+d x)} \left (\frac{1}{2} a (4 A+3 B)+\frac{3}{2} a B \sec (c+d x)\right )}{\sqrt{\sec (c+d x)}} \, dx\\ &=\frac{2 a^2 (4 A+3 B) \sin (c+d x)}{3 d \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)}}+\frac{2 a A \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)} \sin (c+d x)}{3 d}+\left (a B \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \sqrt{\sec (c+d x)} \sqrt{a+a \sec (c+d x)} \, dx\\ &=\frac{2 a^2 (4 A+3 B) \sin (c+d x)}{3 d \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)}}+\frac{2 a A \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)} \sin (c+d x)}{3 d}-\frac{\left (2 a B \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{1+\frac{x^2}{a}}} \, dx,x,-\frac{a \tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{d}\\ &=\frac{2 a^{3/2} B \sinh ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right ) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}}{d}+\frac{2 a^2 (4 A+3 B) \sin (c+d x)}{3 d \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)}}+\frac{2 a A \sqrt{\cos (c+d x)} \sqrt{a+a \sec (c+d x)} \sin (c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.429692, size = 101, normalized size = 0.7 \[ \frac{2 a^2 \sin (c+d x) \left (\sqrt{1-\sec (c+d x)} (A \cos (c+d x)+5 A+3 B)+3 B \sqrt{\sec (c+d x)} \sin ^{-1}\left (\sqrt{1-\sec (c+d x)}\right )\right )}{3 d \sqrt{\cos (c+d x)-1} \sqrt{a (\sec (c+d x)+1)}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.296, size = 201, normalized size = 1.4 \begin{align*} -{\frac{a}{6\,d\sin \left ( dx+c \right ) }\sqrt{\cos \left ( dx+c \right ) }\sqrt{{\frac{a \left ( \cos \left ( dx+c \right ) +1 \right ) }{\cos \left ( dx+c \right ) }}} \left ( -3\,B\sin \left ( dx+c \right ) \sqrt{2}\arctan \left ( 1/4\,\sqrt{2}\sqrt{-2\, \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1}} \left ( \cos \left ( dx+c \right ) +1-\sin \left ( dx+c \right ) \right ) \right ) \sqrt{-2\, \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1}}+3\,B\sqrt{2}\arctan \left ( 1/4\,\sqrt{2}\sqrt{-2\, \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1}} \left ( \cos \left ( dx+c \right ) +1+\sin \left ( dx+c \right ) \right ) \right ) \sqrt{-2\, \left ( \cos \left ( dx+c \right ) +1 \right ) ^{-1}}\sin \left ( dx+c \right ) +4\,A \left ( \cos \left ( dx+c \right ) \right ) ^{2}+16\,A\cos \left ( dx+c \right ) +12\,B\cos \left ( dx+c \right ) -20\,A-12\,B \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 2.05598, size = 787, normalized size = 5.43 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.561161, size = 910, normalized size = 6.28 \begin{align*} \left [\frac{4 \,{\left (A a \cos \left (d x + c\right ) +{\left (5 \, A + 3 \, B\right )} a\right )} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right ) + 3 \,{\left (B a \cos \left (d x + c\right ) + B a\right )} \sqrt{a} \log \left (\frac{a \cos \left (d x + c\right )^{3} - 4 \, \sqrt{a} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}{\left (\cos \left (d x + c\right ) - 2\right )} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{6 \,{\left (d \cos \left (d x + c\right ) + d\right )}}, \frac{2 \,{\left (A a \cos \left (d x + c\right ) +{\left (5 \, A + 3 \, B\right )} a\right )} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right ) + 3 \,{\left (B a \cos \left (d x + c\right ) + B a\right )} \sqrt{-a} \arctan \left (\frac{2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{3 \,{\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \sec \left (d x + c\right ) + A\right )}{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac{3}{2}} \cos \left (d x + c\right )^{\frac{3}{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]